package com.zhanggm.springcloud.jpa.entity;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @Entity 实体类和表的对应关系，标识这个注解的实体类对应着数据一张表
 * @Table 指定实体类和数据库表的对应关系
 */
@Entity
@Table(name = "t_user_entity",catalog = "1711d",schema = "1711d")
@Data
public class UserEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    private String username;

    private String password;

    @Column(name = "create_time",columnDefinition = "datetime DEFAULT NULL COMMENT '创建时间1'")
    private Date createTime;
    private Date updateTime;
    @Transient
    private Integer idStart;
    @Transient
    private Integer idEnd;
}
